//
//  SIXHotButton.m
//  weibo
//
//  Created by 张天兵 on 16/5/21.
//  Copyright © 2016年 chuhan. All rights reserved.
//

#import "SIXHotButton.h"

@implementation SIXHotButton

- (instancetype)initWithFrame:(CGRect)frame {

    if (self = [super initWithFrame:frame]) {
        [self setButton];
    }
    return self;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    
    [self setButton];

}


- (void)setButton {

    [self setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    self.titleLabel.font = [UIFont systemFontOfSize:15];
    self.titleLabel.textAlignment = NSTextAlignmentLeft;

}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    CGFloat imageWidth = self.imageView.frame.size.width;
    CGFloat labelWidth = self.titleLabel.frame.size.width;
    self.imageEdgeInsets = UIEdgeInsetsMake(0, labelWidth + 25, 0, 0);
    self.titleEdgeInsets = UIEdgeInsetsMake(0, -imageWidth + 15, 0, 0);

}


//- (void)setHighlighted:(BOOL)highlighted {};


@end
